#include <iostream>
using namespace std;

bool huiwen(char s[])
{
  int length;
  for (length = 0; s[length]; length++)
    ;
  char *p1, *p2;
  for (p1 = s, p2 = s + length - 1; p1 < p2; p1++, p2--)
  {
    if (*p1 != *p2)
      return 0;
  }
  return 1;
}

int main()
{
  char s[128];
  gets(s);
  cout << huiwen(s) << endl;

  system("pause");
  return 1;
}